import com.benmei.weike.util.DateUtil;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by Peter on 2017/11/9.
 */
public class DateTrans {
    public static void main(String[] args) throws ParseException {
        Date d = new Date();

        Date end = DateUtil.addHour(d,72);
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        System.out.println(sdf.format(end));
    }


    public static Long getTimestamp(String date) throws ParseException {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd H");
        Date d = sdf.parse(date);

        return d.getTime();
    }
}
